package global

import (
	"gitee.com/youbeiwuhuan/go-xxljob/internal/conf"
	"gitee.com/youbeiwuhuan/go-xxljob/pkg/gormv2"
	zaps "gitee.com/youbeiwuhuan/go-xxljob/pkg/zaps"
	"github.com/gin-gonic/gin"
	"go.uber.org/zap"
	"gorm.io/gorm"
)

var (
	Config    conf.AppConfig
	ZapLog    *zap.Logger
	GormDb    *gorm.DB
	GinEngine *gin.Engine
)

func InitGlobal() {
	var file = conf.GetConfFile()
	Config = conf.Load(file)
	ZapLog := zaps.CreateZapFactory(Config.Zap, zaps.ZapLogHandler)

	GormDb, _ = gormv2.GetSqlDriver(Config.Gorm2, ZapLog)

	//GinEngine = gin.New()

}
